home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6396 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: xnet.com!kd9fb
  2. From: kd9fb@xnet.com (Peter Mikalajunas)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Pattern matching in C
  5. Date: Sat, 24 Feb 1996 10:36:13 LOCAL
  6. Organization: xnet.com
  7. Message-ID: <kd9fb.68.003E3651@xnet.com>
  8. References: <4gjo68$jpp@paperboy.ids.net> <4gm8ks$c3p@news-f.iadfw.net>
  9. NNTP-Posting-Host: monsoon.xnet.com
  10. X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #4]
  11.  
  12. scarney@conan.ids.net (scarney) wrote:
  13.  
  14.  
  15. >I'm trying to do some text file pattern matching. Using a simple while 
  16. >loop that has a <data> != <j.random string> in its conditional doesn't 
  17. >work. Depending on different ways of doing it, you get a segmentation 
  18. >fault, random output, or no output.
  19.  
  20. Which sounds like a brute force method.  
  21.  
  22. When you get a segmentation fault and you are dealing with
  23. strings, the chances are good that you have NULL pointer somewhere.
  24.  
  25. Post a snippet, if you feel you need help.
  26.  
  27. You might also want to check ftp.cdrom.com /source/c for examples
  28. of a Boyer-Moore search algorithm.
  29.  
  30. A Yahoo search for Boyer-Moore will also lead you to Knuth-Pratt,
  31. Rabin-Karp, etc.
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  Peter Mikalajunas
  40.  kd9fb@xnet.com
  41.  http://www.xnet.com/~kd9fb
  42.  
  43.